import { AudioMgr } from "../../AudioMgr";
import { Constant } from "../../Constant";
import { Main } from "../../Main";
import StateBase from "../StateBase";

export default class FirstRoleEnterState extends StateBase {
    begin(preState: number): void {
        super.begin(preState);
       // console.log('FirstRoleEnterState state--begin');
        const main = this.getUserData() as Main;
        main.enterRolesRoles[0].playAnimation();
        // main.roundIndex = 1;
      
        main.scheduleOnce(() => {
           
            AudioMgr.inst.playOneShot(main.heroEnter);
        }, 1)
        main.scheduleOnce(() => {
           
            main.mainFsm.goToState(Constant.MainState.SecondRecruitPrepare, main);
        }, 2)
    }
}